package com.tongcao.cn.manager;

import com.tongcao.cn.daiyu.loader.CommandLoader;
import org.slf4j.Logger;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @Author:tongcao
 * @Date:2019/1/11 16:10
 * Description:
 */
@Component
public class HandlerManager {

    private static final Logger logger = org.slf4j.LoggerFactory.getLogger(HandlerManager.class);

    public static final String path = "conf/client_protocol.xml";

    /**
     * 初始化处理器
     */
    @PostConstruct
    public void initHandler() {
        try {
            CommandLoader.getInstance().load(path);
        } catch (Exception e) {
            logger.error("init handler fail , message:" + e.getMessage());
        }
    }
}
